<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:p="http://primefaces.prime.com.tr/ui"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core" 
                xmlns:ui="http://java.sun.com/jsf/facelets"
                template="./../templates/StakeholderPortalTemplate.xhtml">

    <ui:define name="content">
        <f:view beforePhase="#{stakeholderManagedBean.initView}">
            <h:head>
                <title>Stakeholder Portal Information</title>
            </h:head>
                <h:form>
                    <p:panel id="StakeholderAccountDetail" header="#{bundle['stakeholder.header.panel']}" >
                        <p:messages id="statusMessages" redisplay="false" />

                        <p:tabView id="tabViewStakeholderView" dynamic="false">

                            <p:tab id="tabStakeholderAccountInfo" title="#{bundle['stakeholder.accountinfo.tab']}">
                                <h:panelGrid columns="3" cellpadding="5">
                                    <h:outputLabel id="accountStakeholderUsernameLabel" value="#{bundle['stakeholder.username.label']}" style="font-weight: bold"/>
                                    <h:outputLabel id="username" value="#{stakeholderManagedBean.stakeholderAccountState.username}" />
                                    <p:message for="username" />

                                    <h:outputLabel id="accountStakeholderCurrentPasswordLabel" value="#{bundle['myfoodsage.currentpassword.label']}" style="font-weight: bold"/>
                                    <h:outputText id="currpassword" value="******" />
                                    <p:message for="currpassword" />

                                    <h:outputLabel id="noOfBranchAdded" value="#{bundle['no.branch.added.label']}" style="font-weight: bold"/>
                                    <h:outputLabel id="branchsize" value="#{stakeholderManagedBean.branches.size()}" />
                                    <p:message for="branchsize"></p:message>

                                </h:panelGrid>
                            </p:tab>

                            <p:tab id="tabStakeholderPersonalInfo" title="#{bundle['stakeholder.biz.tab']}">
                                <h:panelGrid  columns="3" cellpadding="10">
                                    <h:outputLabel id="accountTouristNameLabel" value="#{bundle['stakeholder.name.label']}" style="font-weight: bold"/>
                                    <h:outputLabel id="name" value="#{stakeholderManagedBean.selectedStakeholder.corpName}" />
                                    <p:message for="username" />

                                    <h:outputLabel id="accountTouristEmailLabel" value ="#{bundle['stakeholder.email.label']}" style="font-weight: bold"/>
                                    <h:outputText id="email" value="#{stakeholderManagedBean.selectedStakeholder.corpEmail}" />
                                    <p:message for="email"/>

                                    <h:outputLabel id="stakeholderAddressLabel" value="Stakeholder Billing   Address" style="font-weight: bold"/> 
                                    <h:outputText id="address" value="#{stakeholderManagedBean.selectedStakeholder.address.blkNumber} 
                                                  #{stakeholderManagedBean.selectedStakeholder.address.unitNumber} 
                                                  #{stakeholderManagedBean.selectedStakeholder.address.buildingName} 
                                                  #{stakeholderManagedBean.selectedStakeholder.address.streetName}
                                                  #{stakeholderManagedBean.selectedStakeholder.address.postalCode}"/>

                                </h:panelGrid>
                            </p:tab>

                        </p:tabView>

                        <br/>
                        <h:commandLink id="editStakeholderAccBtn" value="#{bundle['myfoodsage.edit.button']}" action="EditStakeholderAcc.xhtml" />
                    </p:panel>
                </h:form>
        </f:view>
    </ui:define> 
</ui:composition>
